home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / pdisk.zip / FDTBLINT.ASM < prev    next >
Assembly Source File  |  1989-01-12  |  2KB  |  45 lines

  1. ; FDTBLINT:  Create fixed disk table to use instead of default DOS ones.
  2. ; This version  should normally only be used if you plan to use the IBM
  3. ; diagnostic routines -- these routines screw up the memory management and 
  4. ; overwrite the table of FDTBL.  See accompanying program FDTBL, otherwise.
  5. ;
  6. ; See accompanying program fdins.c for patching this program.
  7. INTR    EQU    (41H*4)
  8. DISKNO    EQU    80H
  9. INTR64    EQU    (64H*4)    ; use reserved for users intrs 64 to 67 to store table
  10.  
  11. CSEG    SEGMENT
  12.     ORG    100H
  13.     ASSUME    CS:CSEG,DS:CSEG
  14. BEGIN:    JMP    SHORT START
  15. DATA    LABEL    BYTE
  16.     DW    1024        ; number of cylinders
  17.     DB    4        ; number of heads
  18.     DW    -1        ; starting reduced write current cylinder (XT only)
  19.     DW    -1        ; starting write precompensation cylinder
  20.     DB    0        ; max ECC data burst length (XT only)
  21.     DB    0        ; control byte
  22.     DB    0        ; standard time out value (XT only)
  23.     DB    0        ; format time out value (XT only)
  24.     DB    0        ; check drive time out value (XT only)
  25.     DW    1024    ; landing zone cyl (usually same as number of cyl)
  26.     DB    17        ; number of sectors per track (don't change)
  27.     DB    0        ; reserved
  28. START:    MOV    SI,OFFSET DATA    ; whence (offset part.  segment part set in DS)
  29.     MOV    DI,INTR64    ; whither (offset part)
  30.     XOR    CX,CX        ; whither (segment part)
  31.     MOV    ES,CX
  32.     MOV    ES:[INTR],DI    ; update pointer to table (offset part)
  33.     MOV    ES:[INTR+2],CX    ; (segment part)
  34.     MOV    CX,8        ; length (in words) of table)
  35.     REP    MOVSW        ; move it in
  36.     MOV    AH,9        ; "initialize characteristics"
  37.     MOV    DL,DISKNO
  38.     INT    13H
  39.     MOV    AH,0        ; "reset disk"
  40.     INT    13H
  41.     MOV    AX,4C00H    ; terminate
  42.     INT    21H
  43. CSEG    ENDS
  44.     END    BEGIN
  45.